<template>
    <div class="selectionSurvey">
        <div class="div_title">{{ title }}</div>
        <div class="div_box">
            <div class="div_box_item">
                <div class="item_div item_number">{{ datas['招商选品'] || 0 }}</div>
                <div class="item_div item_text">招商选品</div>
            </div>
            <van-divider vertical :hairline="false" :style="{ borderColor: '#E5EDFC' }" />
            <div class="div_box_item">
                <div class="item_div item_number">{{ datas['研发选品'] || 0 }}</div>
                <div class="item_div item_text">研发选品</div>
            </div>
            <!-- <van-divider vertical :hairline="false" :style="{ borderColor: '#E5EDFC' }" />
            <div class="div_box_item">
                <div class="item_div item_number">9999</div>
                <div class="item_div item_text">产品选品</div>
            </div> -->
            <van-divider vertical :hairline="false" :style="{ borderColor: '#E5EDFC' }" />
            <div class="div_box_item">
                <div class="item_div item_number">{{ datas['产品出库'] || 0 }}</div>
                <div class="item_div item_text">产品出库</div>
            </div>
            <!-- <van-divider vertical :hairline="false" :style="{ borderColor: '#E5EDFC' }" />
            <div class="div_box_item">
                <div class="item_div item_number">{{ 0 }}</div>
                <div class="item_div item_text">已售卖</div>
            </div> -->
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref, defineProps, onMounted } from 'vue'
import { getSelectionStatistics } from '@/api/operation/index'
defineProps(['title'])
const datas = ref<any>({})
const getList = async () => {
    const { data = [] } = await getSelectionStatistics({})
    datas.value = data[0]
}
onMounted(() => {
    getList()
})
</script>

<style lang="less" scoped>
.selectionSurvey {
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;

    .div_title {
        width: 100%;
        padding: 12px 15px;
        background: linear-gradient(270deg, #0064FF 0%, #008FFF 100%);
        line-height: 38px;
        box-sizing: border-box;
        font-weight: 500;
        font-size: 14px;
        color: #FFFFFF;
    }

    .div_box {
        padding: 30px 10px;
        box-sizing: border-box;
        background: linear-gradient(180deg, #FFFFFF 0%, #EBF4FF 100%);
        display: flex;
        align-items: center;
        justify-content: space-between;

        .div_box_item {
            flex: 1;
            min-width: 0;

            .item_div {
                width: 100%;
                text-align: center;
            }

            .item_number {
                font-weight: 600;
                font-size: 16px;
                color: #1A1B1C;
            }

            .item_text {
                font-weight: 400;
                font-size: 12px;
                color: #8492AD;
            }
        }
    }
}
</style>